<template>
  <div>
    <ModalUI
      title="编辑"
      @change:event="handleChange"
      @submit="edit"
      :formData="formData"
    ></ModalUI>
  </div>
</template>

<script setup lang="ts">
import ModalUI from "./ModalUI.vue";
import { ElMessage } from "element-plus";
const edit = (data) => {
  // 参数处理，数据处理
  // 调用编辑接口
  ElMessage({
    message: "修改成功",
    type: "success",
  });
};
//调用查询接口回显
const formData = ref({
  name: "123456",
  region: "shanghai",
  date1: "2025-06-12T16:00:00.000Z",
  date2: "2025-06-19T08:15:28.000Z",
  delivery: true,
  type: ["Promotion activities", "Simple brand exposure"],
  resource: "Venue",
  desc: "哈哈哈",
});
const handleChange = (v) => {
  if (v) {
    ElMessage({
      message: "调用编辑时的业务接口",
      type: "success",
    });
  }
};
</script>
